package mahmoud.utils;

public class Result implements Comparable<Result>

{
	public int luceneDocID;
	public String realDocId;
	public String resultTitle;
	public String resultContent;
	public String resultfilePath;
	public double resultScore;
	
	public Result(int lid,String docID,String rt, String rc, String rfp, double rs)
	{
		luceneDocID = lid;
		realDocId = docID;
		resultTitle = rt;
		resultContent = rc;
		resultfilePath = rfp;
		resultScore = rs;
	}
	public String toString()
	{
		String output;
		output = String.format("%.40s\t\t Content: %.48s\t\tScore: %f", resultTitle , resultContent, resultScore);
		return output;
	}
	public int getID()
	{
		return luceneDocID;
	}

	@Override
	public int compareTo(Result o)
	{
		if(this.resultScore < o.resultScore)
			return -1;
		else if((this.resultScore > o.resultScore) )
			return 1;
		return 0;
	}



}
